//
//  IGHotCommunityModel.m
//  jingdongfang
//
//  Created by BOE on 2017/8/17.
//  Copyright © 2017年 kevinLY. All rights reserved.
//

#import "IGCommunityModel.h"

@implementation IGCommunityModel

+ (JSONKeyMapper *)keyMapper
{
    return [[JSONKeyMapper alloc]
            initWithModelToJSONDictionary:@{
                                            @"cid":@"id",
                                            @"cTitle":@"name",
                                            @"cImgUrl":@"img",
                                            @"cTopicNum":@"count",
                                            @"cCreateAt":@"createAt",
                                            @"cDetail":@"describe"
                                            }];
}

+ (BOOL)propertyIsOptional:(NSString *)propertyName {
    return YES;
}

- (IGShareModel *)getShareModel {
    IGShareModel *shareModel = [IGShareModel new];
    shareModel.title = self.cTitle;
    shareModel.webpageUrl = self.url;
    shareModel.descr = self.cDetail;
    shareModel.thumbURL = self.cImgUrl;
    
    return shareModel;
}

@end
